<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return CMap::mergeArray(
	require PROTECTED_PATH . '/config/autoload.php',
	require PROTECTED_PATH . '/config/database.php',
	require PROTECTED_PATH . '/config/routes.php',
	require PROTECTED_PATH . '/config/modules.php',
	require PROTECTED_PATH . '/config/params.php',
	array(
		'basePath' => PROTECTED_PATH,
		'name' => 'iweb_manage',
		'defaultController' => 'index',
		'charset' => 'utf-8', 
	
		// preloading 'log' component
		'preload'=>array('log'),
		
		// application components
		'components'=>array(
			//'themeManager' => array(),
			'user'=>array(
				// enable cookie-based authentication
				'allowAutoLogin' => false,
				'loginUrl' => BASE_URL . 'login'
			),
			'clientScript' => array(
				//关闭Yii自带的js
				'enableJavaScript' => false
			),
			'cache' => array(
				'class' => 'CFileCache', //CDummyCache
			),
			//'authManager' => array(
			//	'class' => 'CDbAuthManager',
			//	'connectionID'=>'db',
			//),
			'errorHandler'=>array(
				//'errorAction'=>'index/error',
			),
			'log'=>array(
				'class'=>'CLogRouter',
				'routes'=>array(
					/*
					array(
						'class'=>'CFileLogRoute',
						'levels'=>'error, warning',
					),
					*/
					// uncomment the following to show log messages on web pages
					array(
						'class' => 'CWebLogRoute',
						'categories'=>'system.db.*',
						'levels'=>'error, warning',
						//显示在firebug中
						'showInFireBug' => true
					),
					array(
						'class' => 'CProfileLogRoute',
						'showInFireBug' => false
					)
				),
			),
			'request' => array(
				//开启CSRF防范
				'enableCsrfValidation' => false,
				//开启cookie验证
				'enableCookieValidation' => true,
			),
			'util'=>array(
				'class' => 'ext.utils.UtilClass'
			)
		),
	)
);